/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package packForm.Padroes;

import packForm.Cadastros.FrmCadUsuarios;
import packForm.Cadastros.FrmCadGrupos;
import packForm.Cadastros.FrmCadFormaPag;
import packForm.Cadastros.FrmCadMesas;
import packForm.Cadastros.FrmCadProdutos;
import packForm.Cadastros.FrmCadEmpresa;
import packForm.Cadastros.FrmCadSubGrupos;
import java.beans.PropertyVetoException;
import javax.swing.JFrame;
import packForm.Administracao.FrmCaixa;
import packForm.Administracao.FrmFinanceiro;

/**
 *
 * @author everaldo
 */
public class FrmHome extends javax.swing.JFrame {

    /**
     * Creates new form frmHome
     */
    public FrmHome() {
        initComponents();
        this.setExtendedState(JFrame.MAXIMIZED_BOTH);
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jMenu7 = new javax.swing.JMenu();
        jMenuItem4 = new javax.swing.JMenuItem();
        jMenuItem5 = new javax.swing.JMenuItem();
        painelPrincipal = new javax.swing.JDesktopPane();
        jMenuBar1 = new javax.swing.JMenuBar();
        mnuPrincipal = new javax.swing.JMenu();
        mItemCaixa = new javax.swing.JMenuItem();
        mItemFinanceiro = new javax.swing.JMenuItem();
        mItemSair = new javax.swing.JMenuItem();
        mnuCadastros = new javax.swing.JMenu();
        mItemProdutos = new javax.swing.JMenuItem();
        mItemSubGrupos = new javax.swing.JMenuItem();
        mItemGrupos = new javax.swing.JMenuItem();
        mItemFormaPag = new javax.swing.JMenuItem();
        mItemMesas = new javax.swing.JMenuItem();
        mItemUsuarios = new javax.swing.JMenuItem();
        mItemEmpresas = new javax.swing.JMenuItem();

        jMenu7.setText("jMenu7");

        jMenuItem4.setText("jMenuItem4");

        jMenuItem5.setText("jMenuItem5");

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        mnuPrincipal.setText("Principal");

        mItemCaixa.setText("Caixa");
        mItemCaixa.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mItemCaixaActionPerformed(evt);
            }
        });
        mnuPrincipal.add(mItemCaixa);

        mItemFinanceiro.setText("Financeiro");
        mItemFinanceiro.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mItemFinanceiroActionPerformed(evt);
            }
        });
        mnuPrincipal.add(mItemFinanceiro);

        mItemSair.setText("Sair");
        mItemSair.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mItemSairActionPerformed(evt);
            }
        });
        mnuPrincipal.add(mItemSair);

        jMenuBar1.add(mnuPrincipal);

        mnuCadastros.setText("Cadastros");

        mItemProdutos.setText("Produtos");
        mItemProdutos.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mItemProdutosActionPerformed(evt);
            }
        });
        mnuCadastros.add(mItemProdutos);

        mItemSubGrupos.setText("Subgrupos");
        mItemSubGrupos.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mItemSubGruposActionPerformed(evt);
            }
        });
        mnuCadastros.add(mItemSubGrupos);

        mItemGrupos.setText("Grupos");
        mItemGrupos.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mItemGruposActionPerformed(evt);
            }
        });
        mnuCadastros.add(mItemGrupos);

        mItemFormaPag.setText("Formas de Pagamento");
        mItemFormaPag.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mItemFormaPagActionPerformed(evt);
            }
        });
        mnuCadastros.add(mItemFormaPag);

        mItemMesas.setText("Mesas");
        mItemMesas.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mItemMesasActionPerformed(evt);
            }
        });
        mnuCadastros.add(mItemMesas);

        mItemUsuarios.setText("Usuários");
        mItemUsuarios.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mItemUsuariosActionPerformed(evt);
            }
        });
        mnuCadastros.add(mItemUsuarios);

        mItemEmpresas.setText("Empresa");
        mItemEmpresas.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mItemEmpresasActionPerformed(evt);
            }
        });
        mnuCadastros.add(mItemEmpresas);

        jMenuBar1.add(mnuCadastros);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(painelPrincipal, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 937, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(painelPrincipal, javax.swing.GroupLayout.DEFAULT_SIZE, 524, Short.MAX_VALUE)
        );

        pack();
        setLocationRelativeTo(null);
    }// </editor-fold>//GEN-END:initComponents

    private void mItemEmpresasActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mItemEmpresasActionPerformed
        FrmCadEmpresa cadEmpresa = new FrmCadEmpresa();
        painelPrincipal.add(cadEmpresa);
        cadEmpresa.setVisible(true);
        try {
            cadEmpresa.setMaximum(true);
        } catch (PropertyVetoException ex) {
            System.out.println("Erro: "+ex.getMessage());
        }
    }//GEN-LAST:event_mItemEmpresasActionPerformed

    private void mItemUsuariosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mItemUsuariosActionPerformed
       FrmCadUsuarios cadUsuarios = new FrmCadUsuarios();
        painelPrincipal.add(cadUsuarios);
        cadUsuarios.setVisible(true);
        try {
            cadUsuarios.setMaximum(true);
        } catch (PropertyVetoException ex) {
            System.out.println("Erro: "+ex.getMessage());
        }
    }//GEN-LAST:event_mItemUsuariosActionPerformed

    private void mItemMesasActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mItemMesasActionPerformed
        FrmCadMesas cadMesas = new FrmCadMesas();
        painelPrincipal.add(cadMesas);
        cadMesas.setVisible(true);
        try {
            cadMesas.setMaximum(true);
        } catch (PropertyVetoException ex) {
            System.out.println("Erro: "+ex.getMessage());
        }
    }//GEN-LAST:event_mItemMesasActionPerformed

    private void mItemFormaPagActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mItemFormaPagActionPerformed
        FrmCadFormaPag cadFormaPag = new FrmCadFormaPag();
        painelPrincipal.add(cadFormaPag);
        cadFormaPag.setVisible(true);
        try {
            cadFormaPag.setMaximum(true);
        } catch (PropertyVetoException ex) {
            System.out.println("Erro: "+ex.getMessage());
        }
    }//GEN-LAST:event_mItemFormaPagActionPerformed

    private void mItemGruposActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mItemGruposActionPerformed
        FrmCadGrupos cadGrupos = new FrmCadGrupos();
        painelPrincipal.add(cadGrupos);
        cadGrupos.setVisible(true);
        try {
            cadGrupos.setMaximum(true);
        } catch (PropertyVetoException ex) {
            System.out.println("Erro: "+ex.getMessage());
        }
    }//GEN-LAST:event_mItemGruposActionPerformed

    private void mItemSubGruposActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mItemSubGruposActionPerformed
        FrmCadSubGrupos cadSubGrupos = new FrmCadSubGrupos();
        painelPrincipal.add(cadSubGrupos);
        cadSubGrupos.setVisible(true);
        try {
            cadSubGrupos.setMaximum(true);
        } catch (PropertyVetoException ex) {
            System.out.println("Erro: "+ex.getMessage());
        }
    }//GEN-LAST:event_mItemSubGruposActionPerformed

    private void mItemProdutosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mItemProdutosActionPerformed
        FrmCadProdutos cadProdutos = new FrmCadProdutos();
        painelPrincipal.add(cadProdutos);
        cadProdutos.setVisible(true);
        try {
            cadProdutos.setMaximum(true);
        } catch (PropertyVetoException ex) {
            System.out.println("Erro: "+ex.getMessage());
        }
    }//GEN-LAST:event_mItemProdutosActionPerformed

    private void mItemSairActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mItemSairActionPerformed
        this.dispose();
    }//GEN-LAST:event_mItemSairActionPerformed

    private void mItemCaixaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mItemCaixaActionPerformed
        FrmCaixa caixa = new FrmCaixa();
        painelPrincipal.add(caixa);
        caixa.setVisible(true);
        try {
            caixa.setMaximum(true);
        } catch (PropertyVetoException ex) {
            System.out.println("Erro: "+ex.getMessage());
        }
    }//GEN-LAST:event_mItemCaixaActionPerformed

    private void mItemFinanceiroActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mItemFinanceiroActionPerformed
        FrmFinanceiro financeiro = new FrmFinanceiro();
        painelPrincipal.add(financeiro);
        financeiro.setVisible(true);
        try {
            financeiro.setMaximum(true);
        } catch (PropertyVetoException ex) {
            System.out.println("Erro: "+ex.getMessage());
        }
    }//GEN-LAST:event_mItemFinanceiroActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(FrmHome.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(FrmHome.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(FrmHome.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(FrmHome.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new FrmHome().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JMenu jMenu7;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenuItem jMenuItem4;
    private javax.swing.JMenuItem jMenuItem5;
    private javax.swing.JMenuItem mItemCaixa;
    private javax.swing.JMenuItem mItemEmpresas;
    private javax.swing.JMenuItem mItemFinanceiro;
    private javax.swing.JMenuItem mItemFormaPag;
    private javax.swing.JMenuItem mItemGrupos;
    private javax.swing.JMenuItem mItemMesas;
    private javax.swing.JMenuItem mItemProdutos;
    private javax.swing.JMenuItem mItemSair;
    private javax.swing.JMenuItem mItemSubGrupos;
    private javax.swing.JMenuItem mItemUsuarios;
    private javax.swing.JMenu mnuCadastros;
    private javax.swing.JMenu mnuPrincipal;
    private javax.swing.JDesktopPane painelPrincipal;
    // End of variables declaration//GEN-END:variables
}
